'use strict'
const ExpandMock = (app, isMock) => {
  // isMock
  if(!isMock) return;

  console.log('\x1b[43m%s\x1b[0m', '\r\nMocking...');

  /** stat **/
  app.post('/stat/promt_list', (req, res) => {
    const mockdata = require('./../mock/stat/promt_list.json');
    res.json(mockdata);
  });

  app.post('/stat/promt_add', (req, res) => {
    const mockdata = require('./../mock/stat/promt_add.json');
    res.json(mockdata);
  });



  /** site **/
  app.post('/site/add', (req, res) => {
    const mockdata = require('./../mock/site/add.json');
    res.json(mockdata);
  });

  app.post('/site/save', (req, res) => {
    const mockdata = require('./../mock/site/save.json');
    res.json(mockdata);
  });

  app.post('/site/get', (req, res) => {
    const mockdata = require('./../mock/site/get.json');
    res.json(mockdata);
  });
};

module.exports = ExpandMock;
